<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../Universal.css">
</head>
<body>
    
    <div id="cnblogs_post_body" class="blogpost-body">
        <h2><span style="font-size: 2em">Collection</span></h2>
    <p>集合，集合是java中提供的一种容器，可以用来存储多个数据。<br>     在前面的学习中，我们知道数据多了，可以使用数组存放或者使用ArrayList集合进行存放数据。那么，集合和数组既然都是容器，它们有啥区别呢？</p>
    <ul>
    <li>数组的长度是固定的。集合的长度是可变的。</li>
    <li>集合中存储的元素必须是引用类型数据</li>
    
    
    
    
    
    
    
    
    
    
    
    </ul>
    <h3>集合继承关系图</h3>
    <p>ArrayList的继承关系:</p>
    <p> 查看ArrayList类发现它继承了抽象类AbstractList同时实现接口List，而List接口又继承了Collection接口。Collection接口为最顶层集合接口了。<br>     源代码：</p>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 0, 255, 1)">interface</span> List <span style="color: rgba(0, 0, 255, 1)">extends</span><span style="color: rgba(0, 0, 0, 1)"> Collection {
    }
    </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">class</span> ArrayList <span style="color: rgba(0, 0, 255, 1)">extends</span> AbstractList <span style="color: rgba(0, 0, 255, 1)">implements</span><span style="color: rgba(0, 0, 0, 1)"> List{
    }</span></pre>
    </div>
    <p>集合继承体系：</p>
    <p>这说明我们在使用ArrayList类时，该类已经把所有抽象方法进行了重写。那么，实现Collection接口的所有子类都会进行方法重写。</p>
    <ul>
    <li>Collecton接口常用的子接口有：List接口、Set接口</li>
    <li>List接口常用的子类有：ArrayList类、LinkedList类</li>
    <li>Set接口常用的子类有：HashSet类、LinkedHashSet类</li>
    </ul>
    <p><img src="https://images2015.cnblogs.com/blog/612774/201707/612774-20170714092314400-912409718.png" alt=""></p>
    <h2>Collection</h2>
    <p>集合Collection的方法，是集合中所有实现类必须拥有的方法</p>
    <p>Object[] toArray() 集合中的元素,转成一个数组中的元素, 集合转成数组</p>
    <div class="cnblogs_code">
    <pre>      <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">  Collection接口方法
           *  Object[] toArray() 集合中的元素,转成一个数组中的元素, 集合转成数组
           *  返回是一个存储对象的数组, 数组存储的数据类型是Object
           </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
          <span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function_2() {
            Collection</span>&lt;String&gt; coll = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
            coll.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"itcast"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"itheima"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"money"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"123"<span style="color: rgba(0, 0, 0, 1)">);
            
            Object[] objs </span>=<span style="color: rgba(0, 0, 0, 1)"> coll.toArray();
            </span><span style="color: rgba(0, 0, 255, 1)">for</span>(<span style="color: rgba(0, 0, 255, 1)">int</span> i = 0 ; i &lt; objs.length ; i++<span style="color: rgba(0, 0, 0, 1)">){
              System.out.println(objs[i]);
            }
          }</span></pre>
    </div>
    <p>学习Java中三种长度表现形式：</p>
    <ul>
    <li>数组.length 属性 返回值 int</li>
    <li>字符串.length() 方法,返回值int</li>
    <li>集合.size()方法, 返回值int</li>
    </ul>
    <p>&nbsp;boolean contains(Object o) 判断对象是否存在于集合中,对象存在返回true</p>
    <div class="cnblogs_code">
    <pre>      <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
           * Collection接口方法
           * boolean contains(Object o) 判断对象是否存在于集合中,对象存在返回true
           * 方法参数是Object类型
           </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
          <span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function_1() {
            Collection</span>&lt;String&gt; coll = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
            coll.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"itcast"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"itheima"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"money"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"123"<span style="color: rgba(0, 0, 0, 1)">);
            
            </span><span style="color: rgba(0, 0, 255, 1)">boolean</span> b = coll.contains("itcast"<span style="color: rgba(0, 0, 0, 1)">);
            System.out.println(b);
          }</span></pre>
    </div>
    <p>void clear() 清空集合中的所有元素</p>
    <div class="cnblogs_code">
    <pre>      <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
           * Collection接口的方法
           * void clear() 清空集合中的所有元素
           * 集合容器本身依然存在
           </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
          <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function(){
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">接口多态的方式调用</span>
            Collection&lt;String&gt; coll = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
            coll.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"bcd"<span style="color: rgba(0, 0, 0, 1)">);
            System.out.println(coll);
            
            coll.clear();
            
            System.out.println(coll);
            
          }</span></pre>
    </div>
    <p>boolean remove(Object o)移除集合中指定的元素</p>
    <div class="cnblogs_code">
    <pre> <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
         * Collection接口方法
         * boolean remove(Object o)移除集合中指定的元素
         </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
        <span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function_3(){
          Collection</span>&lt;String&gt; coll = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
          coll.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
          coll.add(</span>"money"<span style="color: rgba(0, 0, 0, 1)">);
          coll.add(</span>"itcast"<span style="color: rgba(0, 0, 0, 1)">);
          coll.add(</span>"itheima"<span style="color: rgba(0, 0, 0, 1)">);
          coll.add(</span>"money"<span style="color: rgba(0, 0, 0, 1)">);
          coll.add(</span>"123"<span style="color: rgba(0, 0, 0, 1)">);  
          System.out.println(coll);
          
          </span><span style="color: rgba(0, 0, 255, 1)">boolean</span> b = coll.remove("money"<span style="color: rgba(0, 0, 0, 1)">);
          System.out.println(b);
          System.out.println(coll);
        }</span></pre>
    </div>
    <h1>迭代器</h1>
    <p>java中提供了很多个集合，它们在存储元素时，采用的存储方式不同，我们要取出这些集合中的元素，可通过一种通用的获取方式来完成。</p>
    <p>Collection集合元素的通用获取方式：在取元素之前先要判断集合中有没有元素，如果有，就把这个元素取出来，继续在判断，如果还有就再取出来。一直把集合中的所有元素全部取出。这种取出方式专业术语称为迭代。</p>
    <p>每种集合的底层的数据结构不同,例如ArrayList是数组,LinkedList底层是链表,但是无论使用哪种集合,我们都会判断是否有元素，以及取出里面的元素的动作,那么Java为我们提供一个迭代器定义了统一的判断元素和取元素的方法。</p>
    <h3>&nbsp;迭代器的实现原理</h3>
    <p>&nbsp;<span style="font-family: &quot;Courier New&quot;; font-size: 12px">集合中的迭代器:获取集合中元素方式</span></p>
    <pre>接口 Iterator : 两个抽象方法</pre>
    <ul>
    <li>boolean hasNext() 判断集合中还有没有可以被取出的元素,如果有返回true</li>
    <li>next() 取出集合中的下一个元素</li>
    </ul>
    <pre>Iterator接口,找实现类.<br>Collection接口定义方法：Iterator  iterator()  </pre>
    <p><img src="https://images2015.cnblogs.com/blog/612774/201707/612774-20170714094409650-269452684.png" alt=""></p>
    <pre>ArrayList 重写方法 iterator(),返回了Iterator接口的实现类的对象</pre>
    <p><img src="https://images2015.cnblogs.com/blog/612774/201707/612774-20170714094602728-1796039395.png" alt=""></p>
    <p><img src="https://images2015.cnblogs.com/blog/612774/201707/612774-20170714094443353-1281665710.png" alt=""></p>
    <p>&nbsp;使用ArrayList集合的对象</p>
    <pre>Iterator it =array.iterator(),运行结果就是Iterator接口的实现类的对象<br>it是接口的实现类对象,调用方法 hasNext 和 next 集合元素迭代</pre>
    <h3>&nbsp;迭代器的代码实现&nbsp;</h3>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 0, 255, 1)">package</span><span style="color: rgba(0, 0, 0, 1)"> cn.itcast.demo;
    
    </span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> java.util.ArrayList;
    </span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> java.util.Collection;
    </span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> java.util.Iterator;
    
    </span><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
     *  集合中的迭代器:
     *    获取集合中元素方式
     *  接口 Iterator : 两个抽象方法
     *     boolean hasNext() 判断集合中还有没有可以被取出的元素,如果有返回true
     *     next() 取出集合中的下一个元素
     *     
     *  Iterator接口,找实现类.
     *    Collection接口定义方法 
     *       Iterator  iterator()
     *    ArrayList 重写方法 iterator(),返回了Iterator接口的实现类的对象
     *    使用ArrayList集合的对象
     *     Iterator it = array.iterator(),运行结果就是Iterator接口的实现类的对象
     *     it是接口的实现类对象,调用方法 hasNext 和 next 集合元素迭代
     </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
    <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> IteratorDemo {
        </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> main(String[] args) {
            Collection</span>&lt;String&gt; coll = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
            coll.add(</span>"abc1"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"abc2"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"abc3"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"abc4"<span style="color: rgba(0, 0, 0, 1)">);
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">迭代器,对集合ArrayList中的元素进行取出
            
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">调用集合的方法iterator()获取出,Iterator接口的实现类的对象</span>
            Iterator&lt;String&gt; it =<span style="color: rgba(0, 0, 0, 1)"> coll.iterator();
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">接口实现类对象,调用方法hasNext()判断集合中是否有元素
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">boolean b = it.hasNext();
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">System.out.println(b);
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">接口的实现类对象,调用方法next()取出集合中的元素
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">String s = it.next();
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">System.out.println(s);
            
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">迭代是反复内容,使用循环实现,循环的条件,集合中没元素, hasNext()返回了false</span>
            <span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)">(it.hasNext()){
                String s </span>=<span style="color: rgba(0, 0, 0, 1)"> it.next();
                System.out.println(s);
            }
            
            </span><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">for (Iterator&lt;String&gt; it2 = coll.iterator(); it2.hasNext();  ) {
                System.out.println(it2.next());
            }</span><span style="color: rgba(0, 128, 0, 1)">*/</span><span style="color: rgba(0, 0, 0, 1)">
            
        }
    }</span></pre>
    </div>
    <h3>迭代器的执行过程</h3>
    <div class="cnblogs_code">
    <pre> <span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)">(it.hasNext()) {
                System.out.println(it.next());
           }
           
           </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">cursor记录的索引值不等于集合的长度返回true,否则返回false</span>
             <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">boolean</span><span style="color: rgba(0, 0, 0, 1)"> hasNext() {       
               </span><span style="color: rgba(0, 0, 255, 1)">return</span> cursor != size; <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">cursor初值为0</span>
    <span style="color: rgba(0, 0, 0, 1)">                           
             }
    
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">next()方法作用:
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">①返回cursor指向的当前元素 
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">②cursor++</span>
            <span style="color: rgba(0, 0, 255, 1)">public</span><span style="color: rgba(0, 0, 0, 1)"> Object next() {            
                     </span><span style="color: rgba(0, 0, 255, 1)">int</span> i =<span style="color: rgba(0, 0, 0, 1)"> cursor; 
                     cursor </span>= i + 1<span style="color: rgba(0, 0, 0, 1)">;  
                     </span><span style="color: rgba(0, 0, 255, 1)">return</span>  elementData[lastRet =<span style="color: rgba(0, 0, 0, 1)"> i]; 
                 
                 }
         //for循环迭代写法:
            </span><span style="color: rgba(0, 0, 255, 1)">for</span> (Iterator&lt;String&gt; it2 =<span style="color: rgba(0, 0, 0, 1)"> coll.iterator(); it2.hasNext();  ) {
             System.out.println(it2.next());
           } </span></pre>
    </div>
    <h3>集合迭代中的转型&nbsp;</h3>
    <p>在使用集合时，我们需要注意以下几点：</p>
    <p>1、集合中存储的其实都是对象的地址。</p>
    <p>2、集合中可以存储基本数值吗？jdk1.5版本以后可以存储了。因为出现了基本类型包装类，它提供了自动装箱操作（基本类型对象），这样，集合中的元素就是基本数值的包装类对象。</p>
    <p>3、存储时提升了Object。取出时要使用元素的特有内容，必须向下转型。&nbsp;&nbsp;注意：如果集合中存放的是多个对象，这时进行向下转型会发生类型转换异常。</p>
    <div class="cnblogs_code">
    <pre> Collection coll = <span style="color: rgba(0, 0, 255, 1)">new</span><span style="color: rgba(0, 0, 0, 1)"> ArrayList();
         coll.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
         coll.add(</span>"aabbcc"<span style="color: rgba(0, 0, 0, 1)">);
         coll.add(</span>"shitcast"<span style="color: rgba(0, 0, 0, 1)">);
         Iterator it </span>=<span style="color: rgba(0, 0, 0, 1)"> coll.iterator();
         </span><span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)"> (it.hasNext()) {
          </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">由于元素被存放进集合后全部被提升为Object类型
         </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">当需要使用子类对象特有方法时，需要向下转型</span>
          String str =<span style="color: rgba(0, 0, 0, 1)"> (String) it.next();
          System.out.println(str.length());
    }</span></pre>
    </div>
    <p>4、Iterator接口也可以使用&lt;&gt;来控制迭代元素的类型的。代码演示如下：&nbsp;</p>
    <div class="cnblogs_code">
    <pre> Collection&lt;String&gt; coll = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
         coll.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
         coll.add(</span>"aabbcc"<span style="color: rgba(0, 0, 0, 1)">);
         coll.add(</span>"shitcast"<span style="color: rgba(0, 0, 0, 1)">);
         Iterator</span>&lt;String&gt; it =<span style="color: rgba(0, 0, 0, 1)"> coll.iterator();
         </span><span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)"> (it.hasNext()) {
          String str </span>=<span style="color: rgba(0, 0, 0, 1)">  it.next(); 
         </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">当使用Iterator&lt;String&gt;控制元素类型后，就不需要强转了。获取到的元素直接就是String类型</span>
    <span style="color: rgba(0, 0, 0, 1)">      System.out.println(str.length());
    }</span></pre>
    </div>
    <h3>增强for循环遍历数组</h3>
    <div class="cnblogs_code">
    <pre>  <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
          *  JDK1.5新特性,增强for循环
          *  JDK1.5版本后,出现新的接口 java.lang.Iterable
          *    Collection开是继承Iterable
          *    Iterable作用,实现增强for循环
          *    
          *    格式:
          *      for( 数据类型  变量名 : 数组或者集合 ){
          *         sop(变量);
          *      }
          </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
         <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function_1(){
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">for对于对象数组遍历的时候,能否调用对象的方法呢</span>
            String[] str = {"abc","itcast","cn"<span style="color: rgba(0, 0, 0, 1)">};
            </span><span style="color: rgba(0, 0, 255, 1)">for</span><span style="color: rgba(0, 0, 0, 1)">(String s : str){
              System.out.println(s.length());
            }
          }</span></pre>
    </div>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
           *  实现for循环,遍历数组
           *  好处: 代码少了,方便对容器遍历
           *  弊端: 没有索引,不能操作容器里面的元素
           </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
          <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function(){
            </span><span style="color: rgba(0, 0, 255, 1)">int</span>[] arr = {3,1,9,0<span style="color: rgba(0, 0, 0, 1)">};
            </span><span style="color: rgba(0, 0, 255, 1)">for</span>(<span style="color: rgba(0, 0, 255, 1)">int</span><span style="color: rgba(0, 0, 0, 1)"> i : arr){
              System.out.println(i</span>+1<span style="color: rgba(0, 0, 0, 1)">);
            }
            System.out.println(arr[</span>0<span style="color: rgba(0, 0, 0, 1)">]);
          }</span></pre>
    </div>
    <h3>增强for循环遍历集合&nbsp;&nbsp;</h3>
    <div class="cnblogs_code">
    <pre>        <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
             *  增强for循环遍历集合
             *  存储自定义Person类型
             </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
            <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function_2(){
              ArrayList</span>&lt;Person&gt; array = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;Person&gt;<span style="color: rgba(0, 0, 0, 1)">();
              array.add(</span><span style="color: rgba(0, 0, 255, 1)">new</span> Person("a",20<span style="color: rgba(0, 0, 0, 1)">));
              array.add(</span><span style="color: rgba(0, 0, 255, 1)">new</span> Person("b",10<span style="color: rgba(0, 0, 0, 1)">));
              </span><span style="color: rgba(0, 0, 255, 1)">for</span><span style="color: rgba(0, 0, 0, 1)">(Person p : array){
                System.out.println(p);</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)"> System.out.println(p.toString());</span>
    <span style="color: rgba(0, 0, 0, 1)">          }
            }</span></pre>
    </div>
    <h1><img src="https://images2015.cnblogs.com/blog/612774/201707/612774-20170714172624134-932430267.png" alt=""></h1>
    <p>&nbsp;</p>
    <h1>泛型</h1>
    <h3>泛型的引入</h3>
    <p>&nbsp;在前面学习集合时，我们都知道集合中是可以存放任意对象的，只要把对象存储集合后，那么这时他们都会被提升成Object类型。当我们在取出每一个对象，并且进行相应的操作，这时必须采用类型转换。比如下面程序：</p>
    <p>&nbsp;</p>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> GenericDemo {
      </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> main(String[] args) {
        List list </span>= <span style="color: rgba(0, 0, 255, 1)">new</span><span style="color: rgba(0, 0, 0, 1)"> ArrayList();
        list.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
        list.add(</span>"itcast"<span style="color: rgba(0, 0, 0, 1)">);
        list.add(</span>5);<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">由于集合没有做任何限定，任何类型都可以给其中存放
                    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">相当于:Object obj=new Integer(5);</span>
    <span style="color: rgba(0, 0, 0, 1)">    
        Iterator it </span>=<span style="color: rgba(0, 0, 0, 1)"> list.iterator();
        </span><span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)">(it.hasNext()){
          </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">需要打印每个字符串的长度,就要把迭代出来的对象转成String类型</span>
          String str = (String) it.next();<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">String str=(String)obj;
                                          </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">编译时期仅检查语法错误,String是Object的儿子可以向下转型
                                          </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">运行时期String str=(String)(new Integer(5))
                                          </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">String与Integer没有父子关系所以转换失败
                                          </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">程序在运行时发生了问题java.lang.ClassCastException</span>
    <span style="color: rgba(0, 0, 0, 1)">      System.out.println(str.length());
        }
      }
    }</span></pre>
    </div>
    <h2>泛型的定义和使用</h2>
    <p>JDK1.5 出现新的安全机制,保证程序的安全性，泛型指明了集合中存储数据的类型 &nbsp;&lt;数据类型&gt;</p>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> GenericDemo {
          </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> main(String[] args) {
            function();
          }
          
          </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> function(){
            Collection</span>&lt;String&gt; coll = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
            coll.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"rtyg"<span style="color: rgba(0, 0, 0, 1)">);
            coll.add(</span>"43rt5yhju"<span style="color: rgba(0, 0, 0, 1)">);
        </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">    coll.add(1);</span>
    <span style="color: rgba(0, 0, 0, 1)">        
            Iterator</span>&lt;String&gt; it =<span style="color: rgba(0, 0, 0, 1)"> coll.iterator();
            </span><span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)">(it.hasNext()){
              String s </span>=<span style="color: rgba(0, 0, 0, 1)"> it.next();
              System.out.println(s.length());
            }
          }
        }</span></pre>
    </div>
    <h3>Java中的伪泛型</h3>
    <p>Java中的伪泛型：泛型只在编译时存在,编译后就被擦除,在编译之前我们就可以限制集合的类型,起到作用<br>     例如:ArrayList&lt;String&gt; al=new ArrayList&lt;String&gt;();&nbsp;编译后:ArrayList al=new ArrayList();</p>
    <h3>泛型类</h3>
    <p>定义格式：&nbsp;<span class="cnblogs_code">修饰符 <span style="color: rgba(0, 0, 255, 1)">class</span> 类名&lt;代表泛型的变量&gt; { }</span>&nbsp;</p>
    <div class="cnblogs_code">
    <pre> <span style="color: rgba(0, 0, 255, 1)">class</span> ArrayList&lt;E&gt;<span style="color: rgba(0, 0, 0, 1)">{ 
            </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">boolean</span><span style="color: rgba(0, 0, 0, 1)"> add(E e){ }
            </span><span style="color: rgba(0, 0, 255, 1)">public</span> E get(<span style="color: rgba(0, 0, 255, 1)">int</span><span style="color: rgba(0, 0, 0, 1)"> index){  }
          }</span></pre>
    </div>
    <p>使用格式：创建对象时，确定泛型的类型</p>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">例如，ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();      
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">此时，变量E的值就是String类型</span>
    <span style="color: rgba(0, 0, 255, 1)">class</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">{
        </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">boolean</span><span style="color: rgba(0, 0, 0, 1)"> add(String e){ }
        </span><span style="color: rgba(0, 0, 255, 1)">public</span> String get(<span style="color: rgba(0, 0, 255, 1)">int</span><span style="color: rgba(0, 0, 0, 1)"> index){  }
    }
    
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">例如，ArrayList&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">此时，变量E的值就是Integer类型</span>
    <span style="color: rgba(0, 0, 255, 1)">class</span> ArrayList&lt;Integer&gt;<span style="color: rgba(0, 0, 0, 1)">{
        </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">boolean</span><span style="color: rgba(0, 0, 0, 1)"> add(Integer e){ }
        </span><span style="color: rgba(0, 0, 255, 1)">public</span> Integer get(<span style="color: rgba(0, 0, 255, 1)">int</span><span style="color: rgba(0, 0, 0, 1)"> index){  }
    }</span></pre>
    </div>
    <h3>泛型方法</h3>
    <p>定义格式：&nbsp;<span class="cnblogs_code">修饰符 &lt;代表泛型的变量&gt; 返回值类型 方法名(参数){ }</span>&nbsp;</p>
    <p>泛型方法的使用：</p>
    <p>例如，API中的ArrayList集合中的方法：</p>
    <div class="cnblogs_code">
    <pre> <span style="color: rgba(0, 0, 255, 1)">public</span> &lt;T&gt;<span style="color: rgba(0, 0, 0, 1)"> T[] toArray(T[] a){  } 
     </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">该方法，用来把集合元素存储到指定数据类型的数组中，返回已存储集合元素的数组</span></pre>
    </div>
    <p>使用格式：调用方法时，确定泛型的类型</p>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">例如:</span>
    ArrayList&lt;String&gt; list = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
    String[] arr </span>= <span style="color: rgba(0, 0, 255, 1)">new</span> String[100<span style="color: rgba(0, 0, 0, 1)">];
    String[] result </span>=<span style="color: rgba(0, 0, 0, 1)"> list.toArray(arr);
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">此时，变量T的值就是String类型。变量T，可以与定义集合的泛型不同</span>
    <span style="color: rgba(0, 0, 255, 1)">public</span> &lt;String&gt;<span style="color: rgba(0, 0, 0, 1)"> String[] toArray(String[] a){  }
    
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">例如:</span>
    ArrayList&lt;String&gt; list = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
    Integer[] arr </span>= <span style="color: rgba(0, 0, 255, 1)">new</span> Integer[100<span style="color: rgba(0, 0, 0, 1)">];
    Integer [] result </span>=<span style="color: rgba(0, 0, 0, 1)"> list.toArray(arr);
    
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">此时，变量T的值就是Integer类型。变量T，可以与定义集合的泛型不同</span>
    <span style="color: rgba(0, 0, 255, 1)">public</span> &lt;Integer&gt; Integer[] toArray(Integer[] a){  } </pre>
    </div>
    <h3>泛型接口</h3>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
     *  带有泛型的接口
     *  
     *  public interface List &lt;E&gt;{
     *    abstract boolean add(E e);
     *  }
     * 
     *  实现类,先实现接口,不理会泛型
     *  public class ArrayList&lt;E&gt; implements List&lt;E&gt;{
     *  }
     *  调用者 : new ArrayList&lt;String&gt;() 后期创建集合对象的时候,指定数据类型
     *  
     *  
     *  实现类,实现接口的同时,也指定了数据类型
     *  public class XXX implements List&lt;String&gt;{
     *  }
     *  new XXX()
     </span><span style="color: rgba(0, 128, 0, 1)">*/</span></pre>
    </div>
    <h3>泛型的好处</h3>
    <p>将运行时期的ClassCastException，转移到了编译时期。<br>避免了类型强转的麻烦。</p>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> GenericDemo {
          </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> main(String[] args) {
            List</span>&lt;String&gt; list = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
            list.add(</span>"abc"<span style="color: rgba(0, 0, 0, 1)">);
            list.add(</span>"itcast"<span style="color: rgba(0, 0, 0, 1)">);
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">list.add(5);</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">当集合明确类型后，存放类型不一致就会编译报错
                         </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">集合已经明确具体存放的元素类型，那么在使用迭代器的时候，迭代器也同样会知道具体遍历元素类型</span>
    <span style="color: rgba(0, 0, 0, 1)">       
            Iterator</span>&lt;String&gt; it =<span style="color: rgba(0, 0, 0, 1)"> list.iterator();
            </span><span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)">(it.hasNext()){
               String str </span>=<span style="color: rgba(0, 0, 0, 1)"> it.next();
               System.out.println(str.length()); </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">当使用Iterator&lt;String&gt;      
                                                </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">控制元素类型后，就不需要强转了。获取到的元素直接就是String类型</span>
    <span style="color: rgba(0, 0, 0, 1)">        }
          }
        }</span></pre>
    </div>
    <h3>泛型的通配符 &nbsp;&nbsp;</h3>
    <pre>? 泛型的通配,匹配所有的数据类型</pre>
    <div class="cnblogs_code">
    <pre><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
       *  泛型的通配符
       </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
    <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> GenericDemo {
        </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> main(String[] args) {
            ArrayList</span>&lt;String&gt; array = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;String&gt;<span style="color: rgba(0, 0, 0, 1)">();
    
            HashSet</span>&lt;Integer&gt; set = <span style="color: rgba(0, 0, 255, 1)">new</span> HashSet&lt;Integer&gt;<span style="color: rgba(0, 0, 0, 1)">();
    
            array.add(</span>"123"<span style="color: rgba(0, 0, 0, 1)">);
            array.add(</span>"456"<span style="color: rgba(0, 0, 0, 1)">);
    
            set.add(</span>789<span style="color: rgba(0, 0, 0, 1)">);
            set.add(</span>890<span style="color: rgba(0, 0, 0, 1)">);
    
            iterator(array);
            iterator(set);
        }
        </span><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
         *  定义方法,可以同时迭代2个集合
         *  参数: 怎么实现 , 不能写ArrayList,也不能写HashSet
         *  参数: 或者共同实现的接口
         *  泛型的通配,匹配所有的数据类型  ?
         </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
        <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span> iterator(Collection&lt;?&gt;<span style="color: rgba(0, 0, 0, 1)"> coll){
            Iterator</span>&lt;?&gt; it =<span style="color: rgba(0, 0, 0, 1)"> coll.iterator();
            </span><span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)">(it.hasNext()){
                </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">it.next()获取的对象,什么类型</span>
    <span style="color: rgba(0, 0, 0, 1)">            System.out.println(it.next());
            }
        }
    }</span></pre>
    </div>
    <h3>泛型的限定&nbsp;</h3>
    <pre>? extends Employee 限制的是父类, 上限限定<br>? super   Employee 限制的是子类, 下限限定</pre>
    <div class="cnblogs_code">
    <pre> <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
        *  将的酒店员工,厨师,服务员,经理,分别存储到3个集合中
        *  定义方法,可以同时遍历3集合,遍历三个集合的同时,可以调用工作方法
        </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
       <span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> java.util.ArrayList;
       </span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> java.util.Iterator;
    
    </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> GenericTest {
        </span><span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span><span style="color: rgba(0, 0, 0, 1)"> main(String[] args) {
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">创建3个集合对象</span>
            ArrayList&lt;ChuShi&gt; cs = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;ChuShi&gt;<span style="color: rgba(0, 0, 0, 1)">();
            ArrayList</span>&lt;FuWuYuan&gt; fwy = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;FuWuYuan&gt;<span style="color: rgba(0, 0, 0, 1)">();
            ArrayList</span>&lt;JingLi&gt; jl = <span style="color: rgba(0, 0, 255, 1)">new</span> ArrayList&lt;JingLi&gt;<span style="color: rgba(0, 0, 0, 1)">();
    
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">每个集合存储自己的元素</span>
            cs.add(<span style="color: rgba(0, 0, 255, 1)">new</span> ChuShi("张三", "后厨001"<span style="color: rgba(0, 0, 0, 1)">));
            cs.add(</span><span style="color: rgba(0, 0, 255, 1)">new</span> ChuShi("李四", "后厨002"<span style="color: rgba(0, 0, 0, 1)">));
    
            fwy.add(</span><span style="color: rgba(0, 0, 255, 1)">new</span> FuWuYuan("翠花", "服务部001"<span style="color: rgba(0, 0, 0, 1)">));
            fwy.add(</span><span style="color: rgba(0, 0, 255, 1)">new</span> FuWuYuan("酸菜", "服务部002"<span style="color: rgba(0, 0, 0, 1)">));
    
            jl.add(</span><span style="color: rgba(0, 0, 255, 1)">new</span> JingLi("小名", "董事会001", 123456789.32<span style="color: rgba(0, 0, 0, 1)">));
            jl.add(</span><span style="color: rgba(0, 0, 255, 1)">new</span> JingLi("小强", "董事会002", 123456789.33<span style="color: rgba(0, 0, 0, 1)">));
    
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">   ArrayList&lt;String&gt; arrayString = new ArrayList&lt;String&gt;();</span>
    <span style="color: rgba(0, 0, 0, 1)">        iterator(jl);
            iterator(fwy);
            iterator(cs);
    
        }
    
        </span><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">
         * 定义方法,可以同时遍历3集合,遍历三个集合的同时,可以调用工作方法 work
         * ? 通配符,迭代器it.next()方法取出来的是Object类型,怎么调用work方法
         * 强制转换:  it.next()=Object o ==&gt; Employee
         * 方法参数: 控制,可以传递Employee对象,也可以传递Employee的子类的对象
         * 泛型的限定  本案例,父类固定Employee,但是子类可以无限?
         *   ? extends Employee 限制的是父类, 上限限定, 可以传递Employee,传递他的子类对象
         *   ? super   Employee 限制的是子类, 下限限定, 可以传递Employee,传递他的父类对象
         </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
        <span style="color: rgba(0, 0, 255, 1)">public</span> <span style="color: rgba(0, 0, 255, 1)">static</span> <span style="color: rgba(0, 0, 255, 1)">void</span> iterator(ArrayList&lt;? <span style="color: rgba(0, 0, 255, 1)">extends</span> Employee&gt;<span style="color: rgba(0, 0, 0, 1)"> array) {
            Iterator</span>&lt;? <span style="color: rgba(0, 0, 255, 1)">extends</span> Employee&gt; it =<span style="color: rgba(0, 0, 0, 1)"> array.iterator();
            </span><span style="color: rgba(0, 0, 255, 1)">while</span><span style="color: rgba(0, 0, 0, 1)"> (it.hasNext()) {
                </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">获取出的next() 数据类型,是什么Employee</span>
                Employee e =<span style="color: rgba(0, 0, 0, 1)"> it.next();
                e.work();
            }
        }
    }</span></pre>
    </div>
    <h3>&nbsp;归纳总结</h3>
    <p><img src="https://images2015.cnblogs.com/blog/612774/201707/612774-20170714152213243-1765828549.png" alt=""></p>
    <p>&nbsp;</p>
    </div>
    
</body>
</html>